package com.ruoyi.appointments.service.impl;

import com.ruoyi.appointments.domain.Appointments;
import com.ruoyi.appointments.mapper.AppointmentsMapper;
import com.ruoyi.appointments.service.IAppointmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 预约管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class AppointmentsServiceImpl implements IAppointmentsService 
{
    @Autowired
    private AppointmentsMapper appointmentsMapper;

    /**
     * 查询预约管理
     * 
     * @param appointmentId 预约管理主键
     * @return 预约管理
     */
    @Override
    public Appointments selectAppointmentsByAppointmentId(Long appointmentId)
    {
        return appointmentsMapper.selectAppointmentsByAppointmentId(appointmentId);
    }

    /**
     * 查询预约管理列表
     * 
     * @param appointments 预约管理
     * @return 预约管理
     */
    @Override
    public List<Appointments> selectAppointmentsList(Appointments appointments)
    {
        return appointmentsMapper.selectAppointmentsList(appointments);
    }

    /**
     * 新增预约管理
     * 
     * @param appointments 预约管理
     * @return 结果
     */
    @Override
    public int insertAppointments(Appointments appointments)
    {
        return appointmentsMapper.insertAppointments(appointments);
    }

    /**
     * 修改预约管理
     * 
     * @param appointments 预约管理
     * @return 结果
     */
    @Override
    public int updateAppointments(Appointments appointments)
    {
        return appointmentsMapper.updateAppointments(appointments);
    }

    /**
     * 批量删除预约管理
     * 
     * @param appointmentIds 需要删除的预约管理主键
     * @return 结果
     */
    @Override
    public int deleteAppointmentsByAppointmentIds(Long[] appointmentIds)
    {
        return appointmentsMapper.deleteAppointmentsByAppointmentIds(appointmentIds);
    }

    /**
     * 删除预约管理信息
     * 
     * @param appointmentId 预约管理主键
     * @return 结果
     */
    @Override
    public int deleteAppointmentsByAppointmentId(Long appointmentId)
    {
        return appointmentsMapper.deleteAppointmentsByAppointmentId(appointmentId);
    }
}
